<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        //思考题
        //不使用第三方变量,如何交换2个number类型的变量的值. 
        let num1 = 10;
        let num2 = 20;


        //交换过程: 
        num1 = num1 + num2; //num1 30   num2 20
        num2 = num1 - num2; //num1 30   num2 10
        num1 = num1 - num2; //num1 20   num2 10
        console.log(num1 , num2); //20  10


    </script>
</body>

</html>